﻿using System;
using Klinkby;

namespace TupleTest
{
    class Program
    {
        enum Unit
        {
            Cups,
            TableSpoon,
            Pcs
        }

        static void Main(string[] args)
        {
            var ingredients = new [] {
                Tuple.Create(6, Unit.Cups, "Flower"),
                Tuple.Create(1, Unit.Pcs, "Egg"),
                Tuple.Create(1, Unit.Cups, "Water"),
                Tuple.Create(1, Unit.TableSpoon, "Salt"),
            };

            foreach (var part in ingredients)
                Console.WriteLine(part);

            Console.WriteLine("\r\n{0} is {1} to {2}",
                ingredients[0], 
                ingredients[0].Equals(ingredients[1]) ? "equal" : "not equal", 
                ingredients[1]);

            var other = Tuple.Create(1, Unit.TableSpoon, "Salt");
            Console.WriteLine("{0} is {1} to {2}",
                other,
                other.Equals(ingredients[3]) ? "equal" : "not equal", 
                ingredients[3]);


        }
    }
}
